#include <iostream>
#include <queue>

using namespace std;


int main()
{
	queue<int> myQ;
	for (int i = 0; i < 10; i++)
	{
		cout << "enqueuing " << i << endl;
		myQ.push(i);
	}
	// enqueing 0
	// enqueing 1
	//...
	// enqueing 9

	
	{

		cout << " size of myQ: " << myQ.size() << endl;
		cout << " size of myQ: " << myQ.back() << endl;
		cout << " size of myQ: " << myQ.front() << endl;
		//10
		//9
		//0
	}

	while (!myQ.empty())
	{
		cout << "dequeing " << myQ.front() << endl;
		myQ.pop();
	}
	// dequeing 0
	// dequeing 1
	//...
	// dequeing 9
	
	cout << " size of myQ: " << myQ.size() << endl;
	// 0
	system("pause");
}
